package tech.dnf.tripartite.nnfpjss.bean.dto;

import lombok.Data;
import tech.dnf.tripartite.nnfpjss.bean.enums.ERequestOperater;

import java.util.Optional;

@Data
public class CallbackRequest implements Request {
    // 接口标识
    private ERequestOperater operater;
    // 开票信息,json字符窜格式
    private String content;
    // 订单编号
    private String orderNo;

    public ERequestOperater getEOperater(){
        return operater;
    }

    public String getOperater() {
        return Optional
            .ofNullable(operater)
            .map(ERequestOperater::getName)
            .orElse(null);
    }

}
